package base

import (
	"github.com/giter/go.rice"
	"github.com/gin-gonic/gin/json"
	"fmt"
	"gitee.com/dayu1985/can_api/controller/app"
)

type BaseTest struct {
	AppBase         string
}

var host = "https://127.0.0.1:40001"
//var host = "https://192.168.100.150:40001"
var Bt = new(BaseTest)

func init()  {
	Bt.AppBase = host + "/app"

	// 初始化数据库
	cbox := rice.MustFindBox("../../conf")
	app.Init(cbox)
}

func Println(obj interface{}) {
	oo,err := json.Marshal(obj)
	if err != nil{
		panic(err)
	}
	fmt.Println(string(oo))
}